//vue.config.js
// const Mock = require('./mock/index.js')
const path = require('path')
const TransformPages = require('uni-read-pages')
const {
	webpack
} = new TransformPages()
module.exports = {
	configureWebpack: {
		plugins: [
			new webpack.DefinePlugin({
				ROUTES: webpack.DefinePlugin.runtimeValue(() => {
					const tfPages = new TransformPages({
						includes: ['path', 'name', 'aliasPath']
					});
					return JSON.stringify(tfPages.routes)
				}, true)
			})
		],
	},
	// devServer: {
	// 	contentBase: path.join(__dirname, 'mock'),
	// 	before(app) {
	// 		Mock(app)
	// 	}
	// }
}